HTML - tags - b tag

revision:


Content

"b" tag : specifies bold text syntax some examples


"b" tag : specifies bold text

top

The <b> tag specifies bold text without any extra importance. It is used to make a portion of the text bold without carrying any special importance. According to the HTML5 specification, the <b> tag should be used as a LAST resort when no other tag is more appropriate. The specification states that headings should be denoted with the <h1> to <h6> tags, emphasized text should be denoted with the <em> tag, important text should be denoted with the <strong> tag, and marked/highlighted text should be denoted with the <mark> tag. <b> tags should be used to bring attention to a span of text without increased importance.

Attributes: this element includes the global attributes. There are no attributes that are specific to the <b> tag.


syntax

top

<b> . . . </b>


some examples

The iPhone 5s edged out the Samsung Galaxy S4 slightly in all of our tests, however we recommend buying both.

code:
                    <p class="spec">The <b>iPhone 5s</b> edged out the <b>Samsung Galaxy S4</b> 
                    slightly in all of our tests, however we recommend buying both.</p>
                

The two most popular science courses offered by the school are chemistry (the study of chemicals and the composition of substances) and physics (the study of the nature and properties of matter and energy).

code:
                <p class="spec">The two most popular science courses offered by the school are <b class="term">chemistry</b> 
                (the study of chemicals and the composition of substances) and <b class="term">physics</b> (the study of the nature and 
                properties of matter and energy).</p>
            

This article describes several text-level elements. It explains their usage in an HTML document.

Keywords are displayed with the default style of the element, likely in bold.

code:
                <p class="spec">This article describes several <b class="keywords">text-level</b> elements.
                It explains their usage in an <b class="keywords">HTML</b> document.</p>
                <p class="spec">Keywords are displayed with the default style of the <b>element, likely in bold.</b></p>
            

Use the <b> tag to create bold text on your pages.

code:
                <p class="spec">Use the <b> tag to create <b>bold text</b> on your pages.</p>
            

We want to bold this text.

code:
                <p class="spec">We want to bold <b>this text</b>.</p>